#include "CDataMgr.h"               //  class definition

CDataMgr::CDataMgr()
{

}

virtual CDataMgr::~CDataMgr()
{
    //  TODO:
    //  Clear lists
    m_pStreets.clear();
    m_pAddress.clear();
    m_pCustomers.clear();
    m_pProducts.clear();
    m_pLineItems.clear();
    m_pOrders.clear();
}

//---------------------------------
//  Loaders
//---------------------------------
void    CDataMgr::LoadStreets()
{
    //  TODO:
    //  Load streets data from streets file
}

void    CDataMgr::LoadAddress()
{
    //  TODO:
    //  Load address data from address file
}

void    CDataMgr::LoadCustomers()
{
    //  TODO:
    //  Load customers data from customers file
}

void    CDataMgr::LoadProducts()
{
    //  TODO:
    //  Load products data from products file
}

void    CDataMgr::LoadLineItems()
{
    //  TODO:
    //  Load line items data from line items file
}

void    CDataMgr::LoadOrders()
{
    //  TODO:
    //  Load orders data from orders file
}


//---------------------------------
//  Savers
//---------------------------------
void    CDataMgr::SaveStreets()
{
    //  TODO:
    //  Save streets list to streets file

}

void    CDataMgr::SaveAddress()
{
    //  TODO:
    //  Save address list to address file
}

void    CDataMgr::SaveCustomers()
{
    //  TODO:
    //  Save customers list to customers file
}

void    CDataMgr::SaveProducts()
{
    //  TODO:
    //  Save products list to products file
}

void    CDataMgr::SaveLineItems()
{
    //  TODO:
    //  Save line items list to line items file
}

void    CDataMgr::SaveOrders()
{
    //  TODO:
    //  Save Orders list to orders file
}


//---------------------------------
//  Get Data
//---------------------------------
QList<LPADDRESS>    CDataMgr::GetAddress()
{
    //  TODO:
    //  generate a new qlist filtering out all houses that dont want a catalogue
    return m_pAddress;
}

QList<LPADDRESS>    CDataMgr::GetALLAddress()
{
    return m_pAddress;
}

QList<LPCUSTOMER>   CDataMgr::GetCustomers()
{
    return m_pCustomers;
}

QList<LPPRODUCT>    CDataMgr::GetProducts()
{
    return m_pProducts;
}

QList<LPORDER>      CDataMgr::GetOrders()
{
    return m_pOrders;
}

QList<LPLINEITEM>   CDataMgr::GetLineItems()
{
    return m_pLineItems;
}

QList<LPSTREET>     CDataMgr::GetStreets()
{
    return m_pStreets;
}

LPSTREET            CDataMgr::GetStreet( int StreetID )
{
    //  TODO:
    //  find specific street in list and return that
    return NULL;
}

LPLINEITEM          CDataMgr::GetLineItem( int LineItemID )
{
    //  TODO:
    //  Find specific line item and return that
    return NULL;
}

LPCUSTOMER          CDataMgr::GetCustomer( int CustomerID )
{
    //  TODO:
    //  Find specific customer and return that
    return NULL;
}

LPCUSTOMER          CDataMgr::GetCustomer( QString sFirstname )
{
    //  TODO:
    //  Find specific customer and return that
    return NULL;
}
